﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Windows;


namespace DTW_Chart
{
    class Program
    {
        public static List<MatchingPoints> resultList;
        public static Sequence sequence1;
        public static Sequence sequence2;
        public static int scalingFactor = 50;
        static void Main(string[] args)
        {
            double distance = 0;
            sequence1 = new Sequence();
            sequence1.addToSequence(1, 1);
            sequence1.addToSequence(1.5, 2);
            sequence1.addToSequence(2, 3);
            sequence1.addToSequence(2.5, 2);
            sequence1.addToSequence(3, 1);
            sequence1.addToSequence(3.5, 2);
            sequence1.addToSequence(4, 3);
            sequence1.addToSequence(4.5, 2);
            sequence1.addToSequence(5, 1);
            
            sequence2 = new Sequence();
            sequence2.addToSequence(1, 1);
            sequence2.addToSequence(1.5, 1.5);
            sequence2.addToSequence(2, 2);
            sequence2.addToSequence(2.5, 1.5);
            sequence2.addToSequence(3, 1);
            sequence2.addToSequence(3.5, 1.5);
            sequence2.addToSequence(4, 2);
            sequence2.addToSequence(4.5, 1.5);
            sequence2.addToSequence(5, 1);

            DTW run = new DTW();
            //  run.printOutResult(run.DynamicTimeWarpingClassic(sequence1, sequence2, ref distance));
            //  run.printOutResult(run.DynamicTimeWarpingStepSizeCondition(sequence1, sequence2, ref distance));
            resultList = run.DynamicTimeWarpingLocalWeight(sequence1, sequence2, ref distance);
            FormChart.run();
            run.printOutResult(resultList);
            Console.WriteLine("Distance: " + distance);
        }
    }
}
